package com.yatube.demo.mongodb.entities;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author Created with IDEA
 * @description -- mongodb中的表结构 document
 * @date 2024-04-23 17:20
 */
@Document("UserData")
@Data
public class User {

    @Id
    private String id; // 注意，mongodb的id是string

    private String name;
    private Integer age;
    private String email;
    private String createDateTime;
}
